home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 November / Macworld (1999-11).dmg / Shareware World / Utilities / Text Processing / Jedit3.0 / Manual / Chap4 Editing < prev    next >
Text File  |  1999-08-09  |  23KB  |  514 lines

  1. Chapter 4 - Editing
  2.  
  3.  
  4. 4.1 The Parts of the Document Window
  5.  
  6. 
  7.  
  8.  Directory pop-up Menu
  9.     Click the document title with the command key down, then a pop-up
  10.     menu will appear as shown below. This example shows that the "Chap
  11.     4 Editing" file is located in the "Manual" folder of the "MY DATA" HD.
  12.     If you select the folder or drive menu item, it will be opened on the
  13.     Finder desktop.
  14.                     
  15.  
  16. Splitting Views
  17.     You can split the document window into more than 2 different views.
  18.      For example, while viewing the beginning of the document in the top
  19.     view, you can edit the end of the document in the bottom view.
  20.     
  21.     To split a window, locate your mouse to the split line under the ruler
  22.     at the top of the window.  When the ruler is not shown in the window,
  23.     the split line will be under the title bar. Your mouse pointer will turn
  24.     into either a   shape or   shape.  Drag the line down to split the
  25.     window.  You can also split the window by double clicking on this split
  26.     line.    
  27.     
  28.     To adjust the height of the split views, locate the mouse pointer over
  29.     the split line. The mouse pointer now will turn into a     shape. 
  30.     Then drag the split line to the desired position.
  31.  
  32.     To remove the split line,  double click on the split line you want
  33.     to remove.
  34.     
  35.  
  36. Ruler
  37.     To show the ruler,  select "Ruler" of "Format" menu or select the
  38.     pop-up menu at the top right corner of the window. You can choose
  39.     the ruler scales between columns, points, centimeters and inches, 
  40.     You can also show the ruler by double clicking on the line under the title
  41.     bar where the mouse pointer turns into the   shape
  42.  
  43.     To hide the ruler, double click on the ruler or choose "Hide" of the
  44.     "Ruler" menu.
  45.     
  46.     The column scales on the ruler are determined by the font and the
  47.     size which are set at "Ruler Font..." on the "Format" menu.
  48.         
  49. Display Line Numbers
  50.     To display line or paragraph numbers, select "Line numbers" from the
  51.     "Format" menu or select the line number pop-up menu at the bottom left
  52.     of the window.  You can also show the numbers by double clicking on the
  53.     left edge of the window where the mouse pointer turns into the
  54.     shape.
  55.     
  56.     To hide the line or paragraph numbers, double click on the numbers
  57.     area or choose "Hide" of the "Line numbers" menu.
  58.     
  59.      If you drag the mouse pointer over the numbers area, the
  60.      corresponding lines in the document will be highlighted.
  61.          
  62. Line Position
  63.     The line position of the cursor appears at the bottom of the window.
  64.     You can show the line number or paragraph number by use of the line
  65.     number pop-up menu on the left side.
  66.     The total number will appear after the "/". If the document is already
  67.     modified but has not been saved yet, a "*" mark will appear after the
  68.     numbers.
  69.     If you click this line position area, the amount of the free memory will
  70.     also be shown.
  71.  
  72. Free Memory
  73.     The free memory indicates the remaining application memory (in
  74.     heap). When the free memory goes below 65KB, an alert box
  75.     will appear. If you see this alert box, quit Jedit3.0 immediately. 
  76.     Then, increase the size of application memory of Jedit3.0.
  77.     
  78.     As the temporary memory is used to edit the documents, the size of
  79.     the free memory is not related to the editable size of the document.
  80.     For example, you can edit an 1 MB text file while the free memory is
  81.     only 200KB.
  82.  
  83.  
  84.  
  85. 4.2 Keyboard Shortcuts
  86.  
  87.  
  88. Moving the Cursor
  89.  
  90. You can use the arrow keys to move the cursor as follows:
  91.  
  92.        Left arrow moves the cursor one character to the left.
  93.        Right arrow moves the cursor one character to the right.
  94.        
  95.        Up arrow moves the cursor one line up.
  96.        Down arrow moves the cursor one line down.
  97.  
  98.        Option+left arrow moves the cursor one word to the left.
  99.        Option+right arrow moves the cursor one word to the right.    
  100.  
  101.        Command+left arrow moves the cursor to the beginning of 
  102.        the paragraph.
  103.        Command+right arrow moves the cursor to the end of the paragraph.
  104.  
  105.        Option+up arrow or page up moves the cursor to the top of
  106.        the current page or the previous page.
  107.        Option+down arrow or page down moves the cursor to the
  108.        bottom of the current page or the next page.
  109.  
  110.        Command+up arrow or Home moves the cursor to the
  111.        beginning of the document.
  112.        Command+down arrow or End moves the cursor to the end
  113.        of the document.
  114.        
  115.        Shift+return scrolls the view to the page where the cursor is located.
  116.        
  117.        Shift+delete deletes the previous word.
  118.        Option+delete deletes the characters from the cursor to the end
  119.        of the paragraph.*1
  120.         
  121. *1: Option+delete also works as an "undo ATOK conversion" function. You can choose the "option+delete" function in "Key-in" of the "Preferences."
  122.  
  123.  
  124. Control Keys
  125.  
  126. You can use the combinations of the control key and character key to move the cursor or scroll through the document window.  You can choose the default key command set between  "diamond cursor" and "emacs like"  in the "Key Commands" preferences. You can also customize each key command. ( (For details, see "Chapter 3, 3.8 Key Commands".)
  127.     
  128.                         
  129.                              Diamond cursor           emacs like
  130. Input control code                    ctrl-P                ctrl-Q
  131. Cursor, one character left            ctrl-S                ctrl-B
  132. Cursor, one character right            ctrl-D                ctrl-F
  133. Cursor, one line up                    ctrl-E                ctrl-P
  134. Cursor, one line down                ctrl-X                ctrl-N
  135. Cursor, one word left                ctrl-A                ESC B
  136. Cursor, one word right                ctrl-F                ESC F
  137. Cursor, to top line of page            ctrl-Q ctrl-E                ESC V
  138. Cursor, to bottom line of page        ctrl-Q ctrl-X                ctrl-V
  139. Cursor, to top of paragraph            ctrl-Q ctrl-S            ctrl-A
  140. Cursor, to end of paragraph            ctrl-Q ctrl-D            ctrl-E
  141. Cursor, to top of document               ctrl-Q ctrl-R                ESC , 
  142. Cursor, to end of document            ctrl-Q ctrl-C            ESC . 
  143. Scroll up one line                    ctrl-W
  144. Scroll down one line                    ctrl-Z
  145. Scroll to previous page                ctrl-R
  146. Scroll to next page                       ctrl-C
  147. Delete right character                ctrl-H                ctrl-H
  148. Delete left character                ctrl-G                ctrl-D
  149. Delete word                        ctrl-T                ESC H
  150. Delete paragraph                    ctrl-Y
  151. Delete from top of para to cursor    ctrl-Q ctrl-T
  152. Delete from cursor to end of para    ctrl-Q ctrl-Y                  ctrl-K ctrl-Y
  153. Insert TAB                        ctrl-I                ctrl-I
  154. Insert line break                    ctrl-M                ctrl-M
  155. Undo                                ctrl-U                ctrl-X ctrl-U
  156. Cut                                                    ctrl-w
  157. Copy                                                    ESC w
  158. Paste                                                ctrl-Y
  159.  
  160.  
  161.  
  162.  
  163. Other Key Commands
  164.  
  165. + To open the contextual menu on MacOS 8 or higher, click the highlighted area with the control key down.
  166.  
  167. + To open a URL in the document, click the URL string with the command key down.
  168.  
  169. + To open the dictionary, click the highlighted word you want to look up  with the command and option keys down. (For details, see "Chapter 3, 3.7 Key-in")
  170.  
  171. + To open the directory menu, click the title on the document window with the command key down.
  172.  
  173. + Function Keys: F1=Undo, F2=Cut, F3=Copy, F4=Paste
  174.  
  175. + If you hold the option key while scrolling, the document will scroll in the opposite direction. 
  176.  
  177. + If you hold the shift key while scrolling, scrolling speed will be slow.
  178.  
  179. + If you press the shift and return key together, Jedit will jump to the page where the cursor is located.
  180.  
  181. + Pressing the shift and delete key together will delete a character to the right side of the cursor. 
  182.  
  183. + If you select "Copy" from the "Edit" menu with the shift key down, only text data (no style data) will be copied to the clipboard.
  184.  
  185. + If you paste or drop text with the shift key down, the lines are formatted and then inserted. If you select "Add Quote Prefixes" in the dialog of "Format Settings..." menu, quote prefixes will be also added.
  186.  
  187. + If you paste text with the control key down, only style data, such as font,  size, style and color will be pasted from your clipboard. 
  188.  
  189. + To paste the current date string, type "d" with the command key down. If you type "d" with both the command and shift keys down, the long date string will be pasted.
  190.  
  191. + To paste the current time string, type "t" with the command key down. If you want to paste the current time string including seconds, type "t" with the command and shift keys down.
  192.  
  193. + To search backwards, select "Find Next" menu with the shift key down, or type "g" with the command and shift keys down. 
  194.  
  195. + To search backward for the selected string, select "Find Selection" with the shift key down, or type "h" with the command and shift keys down. 
  196.  
  197. + If you select the "Hankaku to Zankaku..." or "Zenkaku to Hankaku..." menu with the shift key down, you can convert directly without the setting dialog.
  198.  
  199. + To open a non-text file, select the "Open..." of the menu "File"  with the option key down.
  200.  
  201. + To remove a file name from the "Recent Files" of the menu "File", select that file item with the option key down.
  202.  
  203. + To close all active document windows, close the current document window with the option key down.
  204.  
  205. + To clear all Undo data, select the "Undo" of the menu "Edit" with the option key down.
  206.  
  207. + If you change the font with the "Font" of the menu "Format" with the option key down, the font of the selected area is forced to change to the target font ignoring whether the script of the selected area matches the target font or not.
  208.  
  209. + To insert a file whose file creator is not "TEXT", drag and drop the file icon with the option key down.
  210.  
  211. + To insert an alias for a file or folder, drop the file or folder icon with the control key down.   If the docoument is in the HTML coloring mode, the URL path name of the file will be inserted instead of the alias.
  212.  
  213. + To repair a damaged alias in the document, double click on that alias icon with the option key down.
  214.  
  215. + To change the linkage of the file on the bookmark list, double click on the file icon in the list with the option key down.
  216.  
  217.  
  218.  
  219.  
  220.  
  221. 4.3 Objects
  222.  
  223. You can insert images, sounds, QuickTime files, QuickDraw3D files, and aliases on the Jedit3.0 document file. These non-text items are called "Objects"*.
  224.  
  225. * The term  "objects"  of different meaning is also used in AppleScript. Don't confuse the objects in AppleScript with the above objects.  In  AppleScript,  the "objects" are some sort of targets for the AppleScript commands, such as characters, lines, paragraphs, documents and so on.
  226.  
  227. You can copy, paste, drag and drop these objects in the same manner as the text.  In one document file, the total size of the objects can't exceed 16MB.
  228.  
  229. Image Objects
  230.     The image objects are drawn directly in the Jedit document window.
  231.     They are stored as the "PICT" resources internally.
  232.     You can copy the image object from another application and
  233.     paste it on the Jedit document window.  You may also copy the
  234.     image object from the Jedit document window and paste it on
  235.     another application's document window.  Dragging and dropping
  236.     the images is also available.
  237.     When you drop the image object onto the Finder desktop, a picture
  238.     clipping icon    will appear.  You can also drop the PICT files 
  239.      onto the document window.
  240.     To insert an image object from the PICT file or the PICT resource in
  241.     another file, select the "Import..." of the menu "File". To export image
  242.     objects as new PICT files , select the "Export Objects..."
  243.     of the menu "File".
  244.     
  245. Sound Objects
  246.     The sound objects are stored as the "snd " resources internally. 
  247.     They appear as the icon  on the Jedit document window.
  248.     Double click this object icon to play the sound. When you drop the
  249.     sound object onto the Finder desktop, a sound clipping icon 
  250.     will appear.
  251.     You can also drop the snd files  onto the document window.
  252.     To insert the "snd " resource of another application file,  select the
  253.     menu "Import..." of "File".
  254.     To export sound objects as the new snd files , select the
  255.     menu "Export Objects..." of "File" .
  256.     
  257. QuickTime Objects
  258.     To insert the QuickTime object, select the "Import..." of the menu "File".
  259.     You can also drop the QuickTime files  onto the document
  260.     window directly.
  261.     
  262.     QuickTime objects have a  icon at the top left corner of the
  263.     object area. To play the QuickTime movie, double click somewhere in
  264.     the object area.  To stop the movie, click somewhere outside of the
  265.     object.
  266.     
  267.     * The following pictures are only QuickTime sample images and cannot be played.
  268.                     
  269.  
  270.     QuickTime data itself will be never copied to the Jedit3.0 document
  271.     file. The document file only contains the information to play the
  272.     original QuickTime file.  If you have deleted the original QuickTime
  273.     file, the object can no longer be played. Therefore, if you give
  274.     someone the document files containing QuickTime objects,  you must
  275.     also give the original QuickTime files along with the document files.
  276.     Selecting the "Export Objects..." of the menu "File", you can export the
  277.     QuickTime objects in following formats.
  278.      BMP files , DV Stream Files, PICT files, Movie files
  279.  
  280.  
  281.  
  282. QuickDraw3D Objects
  283.     To insert the QuickDraw3D object, select the "Import..." of
  284.     the menu "File" . You can also drop the QuickDraw3D files  directly
  285.     onto the document window.
  286.     QuickDraw3D objects have a  icon at the top left of the object area.
  287.     To play the QuickDraw3D, double click somewhere in the object area.
  288.     To stop the QuickDraw3D, click somewhere outside of the object area.
  289.     
  290.     *The following pictures are only sample images of QuickDraw3D and can not be opened.
  291.     
  292.                          
  293.     
  294.     The QuickDraw3D objects differ from the QuickTime objects, in that
  295.     they do not require the  existence of an original QuickDraw3D files. 
  296.     All the data of the QuickDraw3D will be contained in the Jedit
  297.     document.
  298.  
  299.     To export the QuickDraw3D objects as new QuickDraw3D files,
  300.     select the "Export Objects..." of the menu "File".    
  301.     
  302.     QuickDraw3D is not available on the 68K Macintoshes.
  303.  
  304.  
  305. Alias Objects
  306.     You can insert the aliases of the files or folders into the Jedit
  307.     document.  An alias icon that looks like the original file icon*
  308.     will appear in your document window. When you double click on the
  309.     alias icon, the original file or folder will be opened.
  310.     
  311.     *The background color of the alias icon is blue.   As custom icons are not supported in
  312.     the Jedit document window, the alias icons of folders or volumes will appear as
  313.     the standard icons.  
  314.     
  315.     The following is the sample of the alias of the "Manual" folder.
  316.       <--- Double click to open the "Manual" folder.
  317.  
  318.     To insert an alias of an file or folder, simply drop the file icon onto
  319.     the document window while holding down the control key.  The alias
  320.     icon of the file will appear in the the document.
  321.     
  322.     Please hold down the control key after you start to drag the file.
  323.     If you hold down the control key at the same time you start to drag,
  324.     the contextual menu will be opened instead.
  325.     
  326.     You can also insert the aliases by selecting the "Import..."of the
  327.     menu "File".
  328.     
  329.     If Jedit3.0 can not find the original file when you double click on the alias
  330.     object, the following dialog will appear and ask you to specify the
  331.     original file.
  332.     
  333.     
  334.             
  335.     To repair the damaged alias, double click on the alias object  with the
  336.     option key down.  This will cause the above dialog to appear.
  337.     
  338.     When you give someone the document files containing the aliases,
  339.     you should also give the original files of the aliases.
  340.     
  341.  
  342.  
  343. 4.4  Undo and Redo
  344.  
  345.  
  346. Select "Undo" from the "Edit" menu to undo the previous action.
  347. Select "Redo" from the "Edit" menu to cancel the previous undo.
  348.  
  349. In the "General" preferences, you can choose the mode between the multiple undo and the single undo.
  350.  
  351. In the multiple undo mode, you can undo the multiple actions and go back to the state when the document was initially opened.  You can also redo multiple times and return to the state when you began to undo.
  352.  
  353. In the single undo mode, you can only undo the previous action.
  354.  
  355. The multiple undo is the default setting.  However, in such cases that you repeat an action thousands of times using AppleScript, the thousands of data of undo may comsume a lot of memory and cause the memory shortage.
  356.  
  357. You can use the following script to switch from the multiple undo to the single undo before you start the memory comsuming scripts.
  358.  
  359.     set infinite undo of document 1 to false
  360.  
  361. (For details, see "Script Manual".)
  362.  
  363. When the free memory is getting shorter, select the "Undo" of the menu  "Edit" with the option key down.  It will clear all the undo data stored in the memory.
  364.  
  365.  
  366.  
  367.  
  368. 4.5 Copy, Cut and Paste
  369.  
  370. You can copy, cut and paste text data just as you can in any other Macintosh applications.
  371.  
  372. When you copy or cut text, style data (such as font,  style and size) will be also copied on the clipboard.
  373.  
  374. To copy text data only, select "Copy" menu with the shift key down.  If you have checked "Unstyled Copy & Paste" in the "General" preferences, you do not have to hold the shift key.
  375.  
  376. If you want to paste only style data, select "Paste" menu with the control key down.
  377.  
  378. Shortcuts for the Highlighted Areas
  379.     To copy or cut  a certain text area, first drag your mouse to highlight
  380.     it. Otherwise:
  381.     
  382.     + To highlight one word, double click on the word.  To highlight one line,
  383.     do triple clicks on the line.  To select an entire paragraph, click four
  384.     times. To highlight the whole document, click five times.
  385.     
  386.     + To highlight between two separate text areas, highlight one area
  387.     first, and then highlight the another area with the shift key down.
  388.     
  389.     + With shift key and cursor control keys such as shift and arrow
  390.     keys, you can also highlight areas without the mouse.
  391.     
  392.     + To highlight lines, drag over the line numbers area shown on the
  393.     left side of the document window.
  394.  
  395. Format Lines  and Add Quotation Marks
  396.     If you paste text with the shift key down, the lines will be formatted to
  397.     the specified width and then be pasted.  If you have checked the "Add
  398.     Quote Prefixes" in the menu "Format Settings", the quote prefix will be
  399.     also added to each formatted line.
  400.  
  401.  
  402. 4.6 Drag & Drop
  403.  
  404. In order to use the drag and drop function, you need a MacOS 7.5 or later or MacOS 7.1.x with Drag and Drop 1.1.  Using drag and drop, you can transfer data between the document windows or the applications much more easily than using copy and paste.
  405.  
  406. You can drag the text data and drop it onto the another document as in the following.
  407.  
  408. Highlight a text area in the document window.  When the mouse pointer goes over the highlighted area, it will turn into a    shape.  Click and hold the mouse button.  The mouse pointer will then turn into a    shape.  While continuing to hold the mouse button, move the pointer onto another document window.  Release the mouse button and the highlighted text area will then be copied on to the new document window.
  409.  
  410. When you drag and drop the text onto the same document window, the text  will be "moved," but not "copied."  If you want to copy the highlighted text in the same document, drag and drop with the option key down.
  411.  
  412. When you drop the objects onto the Finder destop, the following clipping files will be created. When you drop the following clippings into the document file, the contents will be pasted as the objects.
  413.         Text clipping:                
  414.         PICT clipping:                
  415.         Sound clipping:                
  416.         QuickTime clipping    :        
  417.         QuickDraw3D clipping:        
  418.         Alias Clipping:                
  419.         Text including objects:         
  420.  
  421. The QuickTime clippings, QuickDraw3D clippings, alias clippings can only be pasted onto the Jedit3.0 document.  As these clippings are specific to Jedit3.0, you can not drop these clippings onto applications other than Jedit3.0.
  422.  
  423. You can also drop the following files onto Jedit3.0 document windows:
  424.  
  425.      Text Files (The file type must be "TEXT".)
  426.       Read Only Text Files of SimpleText(The file type must be "ttro".)
  427.       PICT Files(The file type must be "PICT".)
  428.      Sound Files(The file type must be "sfil".)
  429.      QuickTime Files(The file type must be "MooV" or "qtif".)
  430.     QuickDraw3D Files(The file type must be "3DMF".)
  431.     
  432. If you drop the text with the shift key down, the lines will be formatted to the specified width and then be inserted.  If you have checked the  "Add Quote Prefixes" in the menu "Format Settings", the quote prefix will be also added to each formatted line.
  433.  
  434. To drop binary files, hold down the option key while dropping the item. 
  435. Keep in mind that the none-text data may not be displayed correctly in
  436. the document window or in some cases it may cause abnormal program
  437. operations.
  438.  
  439. To insert the alias, drop the file, folder or drive icon onto the document with the control key down.  Please hold down the control key after you start to drag the file. If you hold down the control key at the same time you start to drag, the contextual menu will be opened instead.
  440.  
  441. In the HTML coloring mode, to insert a path name or URL, drop the destination file or folder icon onto the document with the control key down.  If the document file is already saved, the relative path to the document file will be inserted, otherwise absolute path will be inserted.
  442. ( For details, see "Chapter 6, 6.5 HTML Assistant Tools")
  443.  
  444.  
  445.  
  446.  
  447. 4.7 Other Functions
  448.  
  449.  
  450. Balance Parentheses
  451.     If the document contains many parentheses or brackets, the
  452.     inclusion of the parentheses will become quite confusing.  It is
  453.     often difficult to determine where a set of the parentheses
  454.     begins or ends. 
  455.     
  456.     To find another half of the parentheses pair, highlight one
  457.     half of the parentheses and selecting the "Balance" of the menu
  458.     "Edit".  Then the entire contents within the parentheses will be
  459.     highlighted.
  460.     
  461.     To highlight the area between the parentheses, locate your
  462.     mouse pointer somewhere between the parentheses pair and
  463.     select the menu "Balance"
  464.     
  465.     Jedit3.0 recognizes the following 13 parentheses, brackets,
  466.     etc.:
  467.     
  468.         
  469.  
  470.  
  471. Shift Right and Shift Left
  472.     You can use the menu "Shift Right" to add a tab indentation. You
  473.     can use the menu "Shift Left" to delete a tab indentation. 
  474.     Note that you can not delete space indentations with the menu
  475.     "Shift Left".
  476.  
  477.  
  478. Paste Date and Time
  479.     To  paste the current date or time string, select the menu "Paste
  480.     Date" or "Paste Time" of "Edit" .
  481.     
  482.     To paste a long string that includes the day of the week, or a time
  483.     that includes seconds, select "Date" or "Time" with the shift key
  484.     down.
  485.     
  486.     See the following examples:
  487.         
  488.         short Date:    99.3.17
  489.         short Time:    9:11 PM    
  490.         
  491.         long Date with shift key :  Wednesday, June 9, 1999
  492.         long Time with shift key :  9:11:41 PM
  493.  
  494. Inserting Page Breaks
  495.     To insert a page break (0x0c), select the menu "Insert Page Break".
  496.     The mark   will be displayed to indicate the page break.
  497.  
  498. Save and Paste Signature
  499.     To register your signature, type your signature in the document
  500.     and highlight it. Then, select the menu "Save As Signature...". 
  501.     Your signature will be stored in the Jedit3.0 Preference file.
  502.     
  503.     If you have set "Internet Config Aware" in the "General"
  504.     preferences, the signature will be also registered in the "Internet
  505.     Config".
  506.     
  507.     To paste your signature, select the menu "Paste Signature".  In
  508.     "Internet Config Aware" mode, the signature of "Internet Config"
  509.     will be pasted instead.
  510.  
  511.  
  512.  
  513.  
  514.